public class Main {
    public static void main(String[] args) {
    Shape [] shapes = new Shape[3];
    shapes[0] = new Rect(2,4);
    shapes[1] = new Circle(2);
    shapes[2] = new triangle(3,6,5);
        for (int i = 0; i < 3; i++) {
            double ret = shapes [i].area();
            System.out.print("面积："+ret);
            double re = shapes [i].length();
            System.out.println(" 周长："+re);
        }
    }
}
